package com.jerry.springcloudalibaba.service;

import com.jerry.springcloudalibaba.entity.CommonResult;
import com.jerry.springcloudalibaba.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "provider-payment", fallback = PaymentFallbackService.class)
public interface PaymentFeignService {

    @GetMapping("/payment/create")
    CommonResult create(Payment payment);

    @GetMapping("/payment/get/{id}")
    CommonResult getPaymentById(@PathVariable("id") Long id);

    @GetMapping("/payment/get")
    CommonResult getPaymentList();

}
